from django.urls import path, include
from rest_framework import routers

from manage.api.category import CategoryViewSet
from manage.api.goods import GoodsViewSet
from manage.api.menu import MenuViewSet
from manage.api.permission import PermissionViewSet
from manage.api.role import RoleViewSet
from manage.api.specs import *
from manage.api.user import *

router=routers.DefaultRouter()
router.register(r'user', UserViewSet,basename='user')
router.register(r'role', RoleViewSet,basename='role')
router.register(r'permission', PermissionViewSet,basename='permission')
router.register(r'menu', MenuViewSet,basename='menu')
router.register(r'category',CategoryViewSet,basename='category')
router.register(r'goods',GoodsViewSet,basename='goods')
router.register(r'specs',SpecsViewSet,basename='specs')
router.register(r'specs_value',SpecsValueViewSet,basename='specs_value')
urlpatterns = [
    path('manage/', include(router.urls)),
    path('manage/user_login/',UserLogin.as_view(),name='login'),
]